using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class food_exchangeMap : EntityTypeConfiguration<food_exchange>
    {
        public food_exchangeMap()
        {
            // Primary Key
            this.HasKey(t => t.food_exchange_id);

            // Properties
            // Table & Column Mappings
            this.ToTable("food_exchange");
            this.Property(t => t.food_exchange_id).HasColumnName("food_exchange_id");
            this.Property(t => t.exchange_share_num).HasColumnName("exchange_share_num");
            this.Property(t => t.energe_num).HasColumnName("energe_num");
            this.Property(t => t.grain_num).HasColumnName("grain_num");
            this.Property(t => t.vegetable_num).HasColumnName("vegetable_num");
            this.Property(t => t.fruit_num).HasColumnName("fruit_num");
            this.Property(t => t.meat_num).HasColumnName("meat_num");
            this.Property(t => t.sugar_num).HasColumnName("sugar_num");
            this.Property(t => t.milk_num).HasColumnName("milk_num");
            this.Property(t => t.grease_num).HasColumnName("grease_num");
            this.Property(t => t.bean_num).HasColumnName("bean_num");
            this.Property(t => t.nut_num).HasColumnName("nut_num");
            this.Property(t => t.protein_percent).HasColumnName("protein_percent");
            this.Property(t => t.fat_percent).HasColumnName("fat_percent");
            this.Property(t => t.carbohydrate_percent).HasColumnName("carbohydrate_percent");
        }
    }
}
